{% extends 'TopxiaWebBundle::layout.html.twig' %}

{% block title %}创建{{setting("classroom.name")|default("班级")}} - {{ parent() }}{% endblock %}

{% set script_controller = 'classroombundle/controller/classroom-admin/create' %}
{% do load_script('classroombundle/controller/classroom-admin/classroom-create') %}


{% block content %}
<div class="row">
  <div class="col-md-offset-2 col-md-8">
    <div class="panel panel-default panel-page">
      <div class="panel-heading"><h2>创建{{setting("classroom.name")|default("班级")}}</h2></div>

        <form id="classroom-create-form" class="form-horizontal" method="post">

          {{ web_macro.flash_messages() }}

          <div class="form-group">
            <div class="col-md-3 control-label">
              <label for="classroom_title" class="required">{{setting("classroom.name")|default("班级")}}名称</label>
            </div>
            <div class="col-md-8 controls">
              <input type="text" id="classroom_title" name="title" required="required" class="form-control" data-widget-cid="widget-1" data-explain="">
              <div class="help-block" style="display:none;"></div>
            </div>
          </div>

          <div class="form-group">
            <div class="col-md-3 control-label">
              <label >{{setting("classroom.name")|default("班级")}}展示</label>
            </div>
            <div id="create-classroom"  class="col-md-8 controls radios">
              <label>
              <input id="showable-open" type="radio" name="showable" value="1" checked="checked" > 开启
              </label>
              <label>
                <input id="showable-close" type="radio" name="showable" value="0"> 关闭
              </label>
              <div class="help-block">关闭后，{{setting("classroom.name")|default("班级")}}将彻底隐藏，无法在前台查看到。</div>
            </div>

          </div>
          <div class="form-group">
            <div id='buyable'>
              <div class="col-md-3 control-label">
                <label >{{setting("classroom.name")|default("班级")}}购买</label>
              </div>
              <div class="col-md-8 controls radios">
                <label>
                  <input id="buyable-open" type="radio" name="buyable" value="1" checked="checked" > 开启
                </label>
                <label>
                  <input id="buyable-close" type="radio" name="buyable" value="0"> 关闭
                </label>
                <div class="help-block">关闭后{{setting("classroom.name")|default("班级")}}将无法在线购买加入。</div>
              </div>
            </div>

          </div>

          <div class="form-group">
            <div class="col-md-offset-3 col-md-8 controls">
              <input id="classroom-create-btn" data-submiting-text="正在创建" class="btn btn-fat btn-primary" type="submit" value="创建">
            </div>
          </div>

          <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">

        </form>

    </div>

  </div>

</div>
{% endblock %}